﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

using Hangjing.Model;
using Hangjing.Common;
using Hangjing.SQLServerDAL;

public partial class HomeDemo_Banner : System.Web.UI.UserControl
{
    Custorder bll = new Custorder();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Hangjing.Model.EAdminInfo model = UserHelp.GetAdmin();
            if (model != null)
            {
                this.snUsername.InnerHtml =model.AdminName;
            }
            else
            {
                Response.Redirect("~/Admin/login.aspx");
            }
          
            string path = Request.Url.PathAndQuery.ToLower();

            string only  =  WebUtility.FixgetCookie("only");
            if (only == null || only == "")
            {
                HttpContext.Current.Response.Redirect("~/Admin/basic.aspx?msg=1");
            }


            //主要用來判斷商家
            if (path.IndexOf("/basic") > 0)
            {

            }
            else
            {
                //WebUtility.checkAccess(model, path);
                //访问权限
                WebUtility.checkOperator(1);
            }
        }

    }
}
